Aggregation queries are important for data exploration and mining. An aggregation query is one which returns a summarizing value about the set of rows in a database table qualified by the Where clause of the query. Some common summarizing values are Count, Sum, Average, Median, Max, Min, etc. A count query is a particular type of aggregation query queries which returns the number of rows qualified by the Where clause of the query. With very large database tables, only a small portion of it can be held in memory at one time. Executing an aggregation query on an entire database can therefore be resource intensive and time consuming. Thus it is to generate a synopsis of a database that is small enough to be held in memory and can be used to generate approximate answer to a query that is sufficiently accurate for the purpose of the query.